<!--
 * @Author: EveChee
 * @Date: 2020-11-20 11:29:42
 * @LastEditors: EveChee
 * @LastEditTime: 2021-01-29 18:41:08
 * @Description: file content
-->
<template>
    <SubMenu
        v-if="item.children && item.children.length"
        :item="item"
    ></SubMenu>
    <el-menu-item :index="item.path" v-else>
        <i v-if="item.icon" :class="item.icon"></i>
        <span slot="title">{{ item.subName }}{{item.path}}</span>
    </el-menu-item>
</template>

<script lang="ts">
import { Component, Prop, Vue } from 'vue-property-decorator'
import { NavData } from './index.vue'
@Component({
    name: 'MenuItem',
    components: { SubMenu: () => import('./SubMenu.vue') },
})
export default class MenuItem extends Vue {
    @Prop()
    item!: NavData
}
</script>

<style scoped lang="less"></style>
